<?php

class Quad_Data_Abstract {
	
	public $raw;
	
	public function __construct($raw = '') {
		$this->raw = $raw;
	}
	
	public static function create($raw = '') {
		$bt = debug_backtrace();
		$class = $bt[0]['class'];
		return new $class($raw);
	}
	
	public function isValid() {
		return true;	
	}
	
	public function isEmpty() {
		return ($this->format() === '');
	}	
	
	public function __toString() {
		return $this->format();
	}
	
	public function format() {
		return $this->raw;
	}
		
}